package 文件流;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;

public class 从盘中取文本内容 {
    public static void main(String[]args){
        File file=new File("e:\\xx\\yy\\aa.txt");
        try {
            FileInputStream fis=new FileInputStream(file);

            int c= 0;
            try {
                c = fis.read();
            } catch (IOException e) {
                e.printStackTrace();
            }
            while (c!=-1){
                System.out.print((char)c);
                try {
                    c=fis.read();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        }
    }
}
